﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using AChance.Func;

namespace AChance.Dal.Func
{
    public static class DalOper
    {
        /// <summary>
        /// 数据库操作
        /// </summary>
        public static DalSqlBase.SqlOper Sql
        {
            get
            {
                return DalSqlBase.GetSqlOper(DalSqlBase.Name.SQLSERVER);
            }
        }
        public static DalSqlBase.SqlOper CreateSql(DalSqlBase.Type sqlType, string connectString)
        {
            return DalSqlBase.CreateSqlOper(sqlType.ToString(), connectString);
        }
        /// <summary>
        /// 文件库操作
        /// </summary>
        public static DalFileBase.IFileOper File
        {
            get
            {
                return DalFileBase.GetFileOper(DalFileBase.Name.LOCAL);
            }
        }
        public static DalFileBase.IFileOper CreateFile(DalFileBase.Type fileType, string connectString)
        {
            return DalFileBase.CreateFileOper(fileType.ToString(), connectString);
        }
    }
}
